home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9984 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What are the best C programming language books for beginner?
  5. Date: 14 Mar 1996 15:08:19 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4ia1s3$dhq@solutions.solon.com>
  8. References: <313FA4BD.41C67EA6@dragon.taiwan.ti.com> <3a7cc$15141.38a@news.comet.net> <199603141755.MAA21327@ncrhub5.attgis.com> <Pine.OSF.3.91.960314122139.8196A-100000@io.UWinnipeg.ca>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <Pine.OSF.3.91.960314122139.8196A-100000@io.UWinnipeg.ca>,
  12. Bill Simpson  <wsimpson@uwinnipeg.ca> wrote:
  13. >>There is a K&R second edition which is supposed to use ANSI examples.
  14.  
  15. >I have that one and it seems pretty mongrel.
  16. >For example, it uses main(), not int main(void).
  17.  
  18. There's nothing wrong with that; those declarations are compatible.
  19. "void main(void)" is actually illegal; "main()" is fine, although a good
  20. compiler will likely warn you that you are using a default return type, which
  21. is Bad.  But "main()" declares main to return int, and take no arguments (or
  22. to take unspecified arguments, if it's a prototype), and this is Correct.
  23.  
  24. Although careful study will yield several trivial errors, and at least one
  25. typo, in K&R 2, it's probably the best book on C I've ever read, and it is
  26. the main reason I have so much trouble motivating myself to keep working on a
  27. C reference manual.
  28.  
  29. -s
  30. -- 
  31. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  32. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  33. FUCK the communications decency act.  Goddamned government.  [literally.]
  34. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  35.